﻿<%@ Page Title="" Language="C#" MasterPageFile="~/DCTEDU_/HeThongMaster.master" AutoEventWireup="true"
    CodeBehind="DMLoaiTinhTrang.aspx.cs" Inherits="QuanLyThietBi.DCTEDU_.DanhMuc.DMLoaiTinhTrang" %>

<%@ Register Assembly="PagerControl" Namespace="CutePager" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">  
<title>Danh mục Loại tình trạng</title>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">     
   <asp:UpdatePanel ID="upPanel1" runat="server" UpdateMode="Conditional">
        <ContentTemplate>
            <asp:HiddenField ID="H_CatalogId" Value="0" runat="server" />
            <div class="row">
                <div class="col-md-12">
                    <section class="panel">
            <header class="panel-heading">
                Danh mục Loại tình trạng</font>
            </header>
           
            <div class="panel-body">
                <div class="form-horizontal bucket-form">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">Tên Loại tình trạng<span style="color: Red">(*)</span></label>
                        <div class="col-sm-6">
                        <asp:TextBox ID="txtTen" runat="server" CssClass="form-control error" MaxLength="100" minlength="2" ></asp:TextBox>
                         <asp:RequiredFieldValidator ID="RequiredFieldValidator1" SetFocusOnError="true"
                                    runat="server" ErrorMessage="*" ControlToValidate="txtTen">
                                                <label class="control-label" for="inputError"><i class="fa fa-times-circle-o"></i> Chưa nhập</label>
                                            </asp:RequiredFieldValidator>
                        </div>
                    </div>
                   
                    <div class="form-group">
                    <div class="col-lg-6">
                    <asp:Button ID="cmdSave" runat="server" Text="Lưu" OnClick="cmdSave_Click" CssClass="btn btn-primary" />
                     </div>
                    </div>
                </div>
            </div>
         
        </section>
                </div>
            </div>
            <div class="row">
                <div class="col-md-12">
                    <section class="panel">
            <header class="panel-heading">
                Danh sách
            </header>
            <div class="panel-body">
            <section>
            <asp:GridView ID="gridCatalog" runat="server" DataKeyNames="MaLoaiTinhTrang" Width="100%" CssClass="table table-bordered table-striped table-condensed" BackColor="White"
                                        OnRowCommand="gridCatalog_RowCommand" OnRowDataBound="gridCatalog_RowDataBound"
                                        OnRowDeleting="gridCatalog_RowDeleting" EmptyDataText="<br><center>Không tồn tại dữ liệu</center><br>"
                                        BorderColor="#CCCCCC" AutoGenerateColumns="false" BorderStyle="Solid" BorderWidth="1px"
                                        CellPadding="3">
                                        <Columns>
                                            <asp:BoundField DataField="MaLoaiTinhTrang" Visible="false" HeaderText="id"></asp:BoundField>
                                            <asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center"
                                                ItemStyle-Width="7%" HeaderText="Sửa">
                                                <ItemTemplate>
                                                    <asp:ImageButton ID="cmdSelects" runat="server" CssClass="command_button" CausesValidation="false"
                                                        CommandName="Select" ToolTip="Click để sửa" ImageUrl="~/Images/edit.png" CommandArgument='<%# Eval("MaLoaiTinhTrang") %>' />
                                                </ItemTemplate>
                                                <ItemStyle HorizontalAlign="Center" Width="7%" />
                                            </asp:TemplateField>
                                            <asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center"
                                                ItemStyle-Width="7%" HeaderText="Xóa">
                                                <ItemTemplate>
                                                    <asp:ImageButton ID="cmdDelete" runat="server" CssClass="command_button" CausesValidation="false"
                                                        CommandName="Delete" ToolTip="Click để xóa" ImageUrl="~/Images/DeleteRed.png"
                                                        CommandArgument='<%# Eval("MaLoaiTinhTrang") %>' />
                                                </ItemTemplate>
                                                <ItemStyle HorizontalAlign="Center" Width="7%" />
                                            </asp:TemplateField>
                                            <asp:BoundField DataField="TenLoaiTinhTrang" ItemStyle-Width="20%" HeaderText="Tên loại tình trạng">
                                            </asp:BoundField>
                                        </Columns>
                                        <RowStyle ForeColor="#000066" />
                                        <SelectedRowStyle BackColor="#dedfdf" Font-Bold="True" ForeColor="Gray" />
                                       
                                    </asp:GridView>
                                     <cc1:Pager ID="Pager1" CssClass="pagination pagination-lg" runat="server" PreviousClause="«" NextClause="»" LastClause=""
                                    FirstClause="" PageClause="Trang" OfClause="/" PageSize="5" OnCommand="Pager1_Command">
                                </cc1:Pager>
            </section>
            </div>
            </section>
                </div>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
